import Mock from '../../mockjs/dist/mock-min.js';

let address = [{
		key: "/address/all",
		method: "get",
		param: {
			clientId: 0,
			statu: true,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': [{
					'id': '@increment(1)',
					'deflg': true,
					'reciver': '@cname()',
					'tel|11': /[1-9]/,
					'address': '@cparagraph()',
					'zip|6': /[0-9]/,
				}, {
					'id': '@increment(1)',
					'deflg': false,
					'reciver': '@cname()',
					'tel|11': /[1-9]/,
					'address': '@cparagraph()',
					'zip|6': /[0-9]/,
				}, {
					'id': '@increment(1)',
					'deflg': false,
					'reciver': '@cname()',
					'tel|11': /[1-9]/,
					'address': '@cparagraph()',
					'zip|6': /[0-9]/,
				}, {
					'id': '@increment(1)',
					'deflg': false,
					'reciver': '@cname()',
					'tel|11': /[1-9]/,
					'address': '@cparagraph()',
					'zip|6': /[0-9]/,
				}, {
					'id': '@increment(1)',
					'deflg': false,
					'reciver': '@cname()',
					'tel|11': /[1-9]/,
					'address': '@cparagraph()',
					'zip|6': /[0-9]/,
				}]
			});
		},
	},
	{
		key: "/address/page",
		method: "get",
		param: {
			current: 1,
			size: 10,
			clientId: 0,
			tel: "",
			reciver: "",
			address: ""
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					'current': 0,
					'size': 10,
					'pages': 6,
					'total': 55,
					"records|10": [{
						'id': '@increment(1)',
						'deflg': false,
						'reciver': '@cname()',
						'tel|11': /[1-9]/,
						'address': '@cparagraph()',
						'zip|6': /[0-9]/,
					}]
				}
			});
		}
	},
	{
		key: "/address/info",
		method: "post",
		param: {
			'deflg': true,
			'reciver': '@cname()',
			'tel': "",
			'address': '',
			'zip': "",
			clientId: 0,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {}
			});
		},
	},
	{
		key: "/address/info",
		method: "put",
		param: {
			id: 0,
			'reciver': '@cname()',
			'tel': "",
			'address': '',
			'zip': "",
			clientId: 0,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {}
			});
		},
	},
	{
		key: "/address/info",
		method: "delete",
		param: {
			id: 0,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {}
			});
		},
	}
];

export default address;